package com.example.bus.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 
 * @TableName bus_content
 */
@TableName(value ="bus_content")
public class BusContent {
    /**
     * 数据id
     */
    @TableId
    private String id;

    /**
     * 内容id
     */
    private String contentId;

    /**
     * 数据内容
     */
    private String contentText;

    /**
     * 数据版本
     */
    private String contentVersion;

    /**
     * 数据id
     */
    public String getId() {
        return id;
    }

    /**
     * 数据id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 内容id
     */
    public String getContentId() {
        return contentId;
    }

    /**
     * 内容id
     */
    public void setContentId(String contentId) {
        this.contentId = contentId;
    }

    /**
     * 数据内容
     */
    public String getContentText() {
        return contentText;
    }

    /**
     * 数据内容
     */
    public void setContentText(String contentText) {
        this.contentText = contentText;
    }

    /**
     * 数据版本
     */
    public String getContentVersion() {
        return contentVersion;
    }

    /**
     * 数据版本
     */
    public void setContentVersion(String contentVersion) {
        this.contentVersion = contentVersion;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BusContent other = (BusContent) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getContentId() == null ? other.getContentId() == null : this.getContentId().equals(other.getContentId()))
            && (this.getContentText() == null ? other.getContentText() == null : this.getContentText().equals(other.getContentText()))
            && (this.getContentVersion() == null ? other.getContentVersion() == null : this.getContentVersion().equals(other.getContentVersion()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getContentId() == null) ? 0 : getContentId().hashCode());
        result = prime * result + ((getContentText() == null) ? 0 : getContentText().hashCode());
        result = prime * result + ((getContentVersion() == null) ? 0 : getContentVersion().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", contentId=").append(contentId);
        sb.append(", contentText=").append(contentText);
        sb.append(", contentVersion=").append(contentVersion);
        sb.append("]");
        return sb.toString();
    }
}